/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package registration;

import java.rmi.server.UnicastRemoteObject;
import java.rmi.RemoteException;
import java.util.Map;

/**
 *
 * @author marco
 */
public class UnoGameRegistration extends UnicastRemoteObject implements Registration {

    Map<String, String> playesGame = null;

    public UnoGameRegistration() throws RemoteException {
        super();
//            playesGame = new HashMap<String, String>();
    }

    public void createGame(String user_name, String game_uri) throws RemoteException {
//        String ret = playesGame.put(user_name, game_uri);
//        System.out.println("Giocatore " + user_name + " gli associo la pratita "  + ret);
    }

    public void dropGame(String user_name) throws RemoteException {
//        String removed = playesGame.remove(user_name);
//
//        if (removed != null)
//            System.out.println("Partita " + removed + " del giocatore " + user_name + " rimossa");
//        else {
//            System.out.println("Nessuna partita di " + user_name + " da rimuovere");
//        }
    }

    public Map<String, String> getPlayesGame() throws RemoteException {
//        System.out.println("Richiesta lista partite");
        return playesGame;
    }
}
